var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var UploadSchema = new mongoose.Schema({ //Schema:一种以文件形式存储的数据库模型骨架
    //Schema:一种以文件形式存储的数据库模型骨架
    cateId: mongoose.Schema.ObjectId,
    fieldname: String,
    originalname: String,
    encoding: String,
    mimetype: String,
    destination: String,
    filename: String,
    path: String,
    paths: String,
    size: Number 
});
UploadSchema.plugin(mongoosePaginate);

module.exports = mongoose.model('upload', UploadSchema);